<%@ page import="edu.uow.devdocs.Deployment" %>

<table class="searchable tableForm boxSilver">
  <tr>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'deploymentVersion', 'error')}"><label for="deploymentVersion"><g:message code="deployment.deploymentVersion.label" default="Deployment Version" /></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'deploymentVersion', 'error')}"><g:textField name="deploymentVersion" maxlength="20" value="${deploymentInstance?.deploymentVersion}"/></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfPlannedDeployment', 'error')}"><label for="dateOfPlannedDeployment"><g:message code="deployment.dateOfPlannedDeployment.label" default="Date of Planned Deployment" /></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfPlannedDeployment', 'error')}"><g:jqDatePicker name="dateOfPlannedDeployment" precision="day"  value="${deploymentInstance?.dateOfPlannedDeployment}" default="none" noSelection="['': '']" /></td>
  </tr>
  <tr>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'referenceNumber', 'error')}"><label for="referenceNumber"><g:message code="deployment.referenceNumber.label" default="Reference Number" /></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'referenceNumber', 'error')}"><g:textField name="referenceNumber" maxlength="20" value="${deploymentInstance?.referenceNumber}"/></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfActualDeployment', 'error')}"><label for="dateOfActualDeployment"><g:message code="deployment.dateOfActualDeployment.label" default="Date of Actual Deployment" /></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfActualDeployment', 'error')}"><g:jqDatePicker name="dateOfActualDeployment" precision="day"  value="${deploymentInstance?.dateOfActualDeployment}" default="none" noSelection="['': '']" /></td>
  </tr>
  <tr>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'project', 'error')} required"><label for="project"><g:message code="deployment.project.label" default="Project" /> <span class="required-indicator">*</span></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'project', 'error')} required"><g:select id="project" name="project.id" from="${edu.uow.devdocs.Project.list()}" optionKey="id" required="" value="${deploymentInstance?.project?.id}" class="many-to-one"/></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfPlannedTestDeploy', 'error')}"><label for="dateOfPlannedTestDeploy"><g:message code="deployment.dateOfPlannedTestDeploy.label" default="Date of Planned Test Deploy" /></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfPlannedTestDeploy', 'error')}"><g:jqDatePicker name="dateOfPlannedTestDeploy" precision="day"  value="${deploymentInstance?.dateOfPlannedTestDeploy}" default="none" noSelection="['': '']" /></td>
  </tr>
  <tr>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'status', 'error')} required"><label for="status"><g:message code="deployment.status.label" default="Status" /> <span class="required-indicator">*</span></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'status', 'error')} required"><g:select id="status" name="status.id" from="${edu.uow.devdocs.DeploymentStatus.list()}" optionKey="id" required="" value="${deploymentInstance?.status?.id}" class="many-to-one"/></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfActualTestDeploy', 'error')}"><label for="dateOfActualTestDeploy"><g:message code="deployment.dateOfActualTestDeploy.label" default="Date of Actual Test Deploy" /></label></td>
    <td class="fieldcontain ${hasErrors(bean: deploymentInstance, field: 'dateOfActualTestDeploy', 'error')}"><g:jqDatePicker name="dateOfActualTestDeploy" precision="day"  value="${deploymentInstance?.dateOfActualTestDeploy}" default="none" noSelection="['': '']" /></td>
  </tr>
  <g:if test="${developmentTaskInstance?.id}">
  <tr>
    <td></td>
    <td colspan="3"><g:link class="show_cost button" action="showCost" id="${deploymentInstance?.id }"><g:message code="default.showCost.label" args="[deploymentInstance]" /></g:link></td>
  </tr>
  </g:if>
</table>
